package com.example.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.mapper.AttractionsMapper;
import com.example.pojo.Attractions;
import com.example.service.AttractionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AttractionsServiceImpl extends ServiceImpl<AttractionsMapper, Attractions> implements AttractionsService {

    @Autowired
    private AttractionsMapper attractionsMapper;

    @Override
    public List<Attractions> selectAllAttractions(String name, Integer start, Integer pageSize) {
        return attractionsMapper.selectAllAttractions(name, start, pageSize);
    }

    @Override
    public int count(String name) {
        return attractionsMapper.count(name);
    }

    @Override
    public int deleteAttractions(Integer id) {
        return attractionsMapper.deleteById(id);
    }

    @Override
    public int updateAttractions(Attractions attractions) {
        return attractionsMapper.updateAttractions(attractions);
    }

    @Override
    public int updateAttractions2(Attractions attractions) {
        return attractionsMapper.updateAttractions2(attractions);
    }

    @Override
    public Attractions selectAttractionsById(Integer id) {
        return attractionsMapper.getAttractionsById(id);
    }
}
